//
//  SNHomeModel.m
//  project
//
//  Created by 张淋 on 2019/6/15.
//  Copyright © 2019 黄建华. All rights reserved.
//

#import "SNHomeModel.h"

@implementation SNHomeModel

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        self.imageName = [aDecoder decodeObjectForKey:@"imageName"];
        self.value = [aDecoder decodeObjectForKey:@"value"];
        self.valueDes = [aDecoder decodeObjectForKey:@"valueDes"];
        self.hrAvg = [aDecoder decodeObjectForKey:@"hrAvg"];
        self.functionTitle = [aDecoder decodeObjectForKey:@"functionTitle"];
        self.add = [[aDecoder decodeObjectForKey:@"add"] boolValue];
        self.order = [[aDecoder decodeObjectForKey:@"order"] intValue];
        self.tag = [[aDecoder decodeObjectForKey:@"tag"] intValue];
    }
    
    return self;
}


- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.imageName forKey:@"imageName"];
    [aCoder encodeObject:self.value forKey:@"value"];
    [aCoder encodeObject:self.valueDes forKey:@"valueDes"];
    [aCoder encodeObject:self.hrAvg forKey:@"hrAvg"];
    [aCoder encodeObject:self.functionTitle forKey:@"functionTitle"];
    [aCoder encodeObject:@(self.add) forKey:@"add"];
    [aCoder encodeObject:@(self.order) forKey:@"order"];
    [aCoder encodeObject:@(self.tag) forKey:@"tag"];
}

@end
